/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business;

import java.util.ArrayList;
import tuitionmanagement.DAO.SubOrderDao;
import tuitionmanagement.entity.SubOrderEntity;

/**
 *
 * @author XUAN
 */
public class SubOrderBuss {

    private String lastError;
    SubOrderDao subdao = new SubOrderDao();

    public SubOrderBuss() {
    }


    public ArrayList<SubOrderEntity> getSubOrderOneStudent(String search) {
        return subdao.getSubOrderOneStudent(search);
    }

    public boolean addSubOrder(SubOrderEntity sub) {
        return subdao.addSubOrder(sub);
    }

    public ArrayList<SubOrderEntity> readByAll() {
        return subdao.readByAll();
    }

    public boolean update(SubOrderEntity sub) {
        return subdao.update(sub);
    }

    public boolean delete(int subId) {
        return subdao.delete(subId);
    }

    public ArrayList<SubOrderEntity> getSubOrderByName(String search) {
        return subdao.getSubOrderByName(search);
    }

    /**
     * @return the lastError
     */
    public String getLastError() {
        return lastError;
    }

    /**
     * @param lastError the lastError to set
     */
    public void setLastError(String lastError) {
        this.lastError = lastError;
    }


}
